// lib/simple_bloc_observer.dart
import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:myapp/app_widget.dart';
import 'package:myapp/bloc/authentication_bloc/authentication_bloc.dart';
import 'package:myapp/repositories/repositories.dart';

class MyApp extends StatelessWidget{
  final UserRepository userRepository;
  const MyApp(this.userRepository, {super.key});
  
  @override
  Widget build(BuildContext context) {
    return RepositoryProvider<AuthenticationBloc>(
      create: (context) => AuthenticationBloc(
        userRepository: userRepository
      ),
    child: const AppWidget()
    );
  }
}